from controller.Base import BaseHandler
from tornado import gen

class IndexHandler(BaseHandler):
    @gen.coroutine
    def get(self, *args, **kwargs):
        if self.session.get("cate", None) is None:
            return self.redirect("/login")
        return self.render("index.html", name=self.session['name'], cate=self.session['cate'])
